package WebModule::BaseUserInfo;

use strict;

use base qw(WebModule);

__PACKAGE__->meta->setup(
    table   => 'base_user_info',

    columns => [
        id                  => { type => 'serial', not_null => 1 },
        user_name           => { type => 'varchar', length => 100, not_null => 1 },
        user_email          => { type => 'varchar', length => 100, not_null => 1 },
        user_password       => { type => 'varchar', length => 200, not_null => 1 },
        register_date       => { type => 'datetime', not_null => 1 },
        last_login_time     => { type => 'datetime' },
        mobile_phone        => { type => 'varchar', length => 20, not_null => 1 },
        verify_mobile_phone => { type => 'enum', check_in => [ 'y', 'n' ], default => 'n' },
        qq_number           => { type => 'varchar', length => 20 },
        verify_qq_number    => { type => 'enum', check_in => [ 'y', 'n' ], default => 'n' },
        picture             => { type => 'varchar', length => 100 },
        verify_picture      => { type => 'enum', check_in => [ 'y', 'n' ], default => 'n' },
        area                => { type => 'integer' },
    ],

    primary_key_columns => [ 'id' ],

    unique_keys => [
        [ 'mobile_phone' ],
        [ 'user_email' ],
        [ 'user_name' ],
    ],
);

1;

